<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登录验证</title>
<script type="text/javascript">
	function check() {
		var uname = document.getElementById("uname").value;
		var upassword = document.getElementById("upassword").value;
		if (uname == "") {
			alert("用户名为空！");
			return false;
		}
		if (upassword == "") {
			alert("密码为空！");
			return false;
		}
	}
	if (window.top != window) {
		window.top.location = "Login";
	}
</script>
</head>
<body>
	<center>
		<h1>用户登录</h1>
		<form action="/login" method="post" onsubmit="return check()">
			<table border="0" width="400px">
				<tr>
					<td align="right">用户名:</td>
					<td><input type="text" name="username" style="width: 180px" /></td>
				</tr>
				<tr>
					<td align="right">密 码:</td>
					<td><input type="password" name="userpwd"/></td>
				</tr>
				<tr>
					<td align="right"><input type="submit" value="登录" /></td>
					<td><input type="reset" value="重置" /></td>
					<td><a href="/Register.jsp">尚未注册，注册用户</a></td>
				</tr>
				<tr><td><font color="red">${message}</font></td></tr>
        </table>
     </form>
  </center>
</body>
</html>
